import React, { Component } from 'react';
import { Link,Route } from "react-router-dom"
import ListItem from './item'

class ArticleList extends Component {
    constructor(props) {
        super(props);
        this.state = {  }
    }
    render() { 
        return ( 
            <div>
                <ul>
                    <ol> <Link to={"/router/article/1"}>article1</Link> </ol>
                    <ol> <Link to={"/router/article/2"}>article2</Link> </ol>
                    <ol> <Link to={"/router/article/3"}>article3</Link> </ol>
                    <ol> <Link to={"/router/article/4"}>article4</Link> </ol>
                </ul> 
                <Route exact path="/router/article/:id" component={ListItem} />
            </div>
        );
    }
}
 
export default ArticleList;